import request from '@/utils/request'

function list(query) {
  return request({
    url: '/role/role',
    method: 'get',
    params: query
  })
}
function info(query) {
  return request({
    url: '/role/info',
    method: 'get',
    params: query
  })
}
function save(data) {
  return request({
    url: '/role/role',
    method: 'post',
    data
  })
}
function update(data) {
  return request({
    url: '/role/role',
    method: 'put',
    data
  })
}
function remove(ids) {
  return request({
    url: '/role/role',
    method: 'delete',
    data: ids
  })
}
function getRoleMenu(params) {
  return request({
    url: '/roleAuth/role',
    method: 'get',
    params
  })
}
function saveRoleMenu(data,params) {
  return request({
    url: '/roleAuth/role',
    method: 'post',
    params,
    data
  })
}
export default {
  list,
  info,
  save,
  update,
  remove,
  saveRoleMenu,
  getRoleMenu
}
